/*
**********************************************************************************
 ECE 527 Project 3
 Module: ling64_adder
 Description: Implementation of 16 bit Ling's adder 

 Team : Rohit Kulkarni
        Akshay Kotian
**********************************************************************************
*/

//***** 16-bit ling adder *******
module ling64(sum,Cout,A,B,Cin);                                                                               
output [63:0] sum;               
output Cout;                 
input [63:0] A;               
input [63:0] B;               
input Cin;                                                                                              
wire [2:0] carry;                 // intermediate carry between each 16 bit adders                                                                 
ling16 l1(sum[15:0],carry[0], A[15:0],B[15:0],Cin);
ling16 l2(sum[31:16],carry[1], A[31:16],B[31:16],carry[0]);
ling16 l3(sum[47:32],carry[2], A[47:32],B[47:32],carry[1]);
ling16 l4(sum[63:48],Cout,A[63:48],B[63:48],carry[2]);
endmodule